#include "Student.h"

Student::Student()
{
//   memset( this, 0, sizeof(Planes) );
}

Student::Student(std::istringstream& students_file)
{
	getline(students_file, _lastName, ',');
	getline(students_file, _firstName, ',');
	_flights = 0;
	_hours = 0;
}

Student::~Student()
{

}

std::string Student::logLine() const
{
	return _logLine;
}


std::string Student::lastName() const
{
	return _lastName;
}

std::string Student::firstName() const
{
	return _firstName;
}

double Student::flights() const
{
	return _flights;
}

double Student::hours() const
{
	return _hours;
}

std::string Student::firstDate() const
{
	return _firstDate;
}

std::string Student::lastDate() const
{
	return _lastDate;
}


//void Student::setStudent(std::string new_logLine, std::string newLastName, std::string newFirstName)
//{
//	_logLine = new_logLine;
//	_lastName = newLastName;
//	_firstName = newFirstName;
//	_flights = 0;
//	_hours = 0;
//}

void Student::addStudentHours(std::string Date, double newStudentHours)
{
	if (_flights == 0)
		_firstDate = Date;
	_lastDate = Date;
	_flights += 1;
	_hours += newStudentHours;
}
